package com.example.train.service;

import com.example.train.model.SysAdminRoleRelation;

import java.util.List;

public interface SysAdminRoleRelationService {

    int deleteByRoleId(long id);

    int deleteByAdminId(long id);

    int deleteById(long id);

    /**
     * adminIds为空时，只靠roleIds查询
     * roleIds为空时，只靠adminIds查询
     * adminIds/roleIds都不为空时，查询同时满足两条件的数据
     * @param adminIds
     * @param roleIds
     * @return
     */
    List<SysAdminRoleRelation> selectByAdminIdsAndRoleIds(List<Long> adminIds,List<Long> roleIds);

    int insert(List<SysAdminRoleRelation> record);
}
